package com.outsider.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegularExpression {
    public static boolean urlTest(String target){
        Pattern p = Pattern.compile("(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]",Pattern.CASE_INSENSITIVE );   
        Matcher m = p.matcher(target);
        return m.find();
    }
    
    public static boolean isInteger(String target){
    	Pattern p= Pattern.compile("[0-9]*");  
    	return p.matcher(target).matches();    
    }
    
}
